using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Erp;

/// <summary>
/// erp-采购退货产品详细
/// </summary>
[SugarTable("erp_purchase_return_info")]
public class ErpPurchaseReturnInfo:Entity
{
    /// <summary>
    /// 采购退货订单编号
    /// </summary>
    [Required]
    public long ReturnId { get; set; }

    /// <summary>
    /// 产品编号
    /// </summary>
    [Required]
    public long ProductId { get; set; }
    
    /// <summary>
    /// 产品信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ProductId))]
    public ErpProduct Product { get; set; }

    /// <summary>
    /// 入库数量
    /// </summary>
    [Required]
    public int Count { get; set; } = 0;

    /// <summary>
    /// 金额
    /// </summary>
    [Required]
    public decimal Amount { get; set; }
    
    /// <summary>
    /// 是否出库
    /// </summary>
    public bool IsOutStock { get; set; } = false;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;


}